import request from '@/utils/request'

// 物料类型-Controller层-请求路径
var materialTypeUrl = "basic/material_type/"

// 获取树形结构的物料类型数据
export function getListByTree(data,page) {
  return request({
    url: materialTypeUrl + "getMaterialTypeList?pageNum=" + page.pageNum + "&pageSize=" + page.pageSize,
    method: "post",
    data: data
  })
}

// 根据物料类别ID获取数据
export function getEntityById(params) {
  return request({
    url: materialTypeUrl + "getEntityById",
    method:"get",
    params:params
  })
}
